﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace KOPLibrary.SharePointManagement
{
    public static class WorkFlowStateDictionary
    {
        //private static Dictionary<SPWorkflowState, string> WFSDictionary = null;

        //private static void Initilize()
        //{
        //    WFSDictionary = new Dictionary<SPWorkflowState, string>();
        //    WFSDictionary.Add(SPWorkflowState.All, "Hepsi");
        //    WFSDictionary.Add(SPWorkflowState.Cancelled, "İptal Edildi");
        //    WFSDictionary.Add(SPWorkflowState.Completed, "Tamamlandı");
        //    WFSDictionary.Add(SPWorkflowState.Expired, "Geçerlilik Süresi Bitti");
        //    WFSDictionary.Add(SPWorkflowState.Expiring, "Geçerlik Süresi Bitiyor");
        //    WFSDictionary.Add(SPWorkflowState.Faulting, "Hatalı");
        //    WFSDictionary.Add(SPWorkflowState.HasNewEvents, "Yeni Olay Var");
        //    WFSDictionary.Add(SPWorkflowState.Locked, "Kilitli");
        //    WFSDictionary.Add(SPWorkflowState.None, "Yok");
        //    WFSDictionary.Add(SPWorkflowState.NotStarted, "Başlamadı");
        //    WFSDictionary.Add(SPWorkflowState.Orphaned, "Belirsiz");
        //    WFSDictionary.Add(SPWorkflowState.Running, "Devam Ediyor");
        //    WFSDictionary.Add(SPWorkflowState.Suspended, "Durduruldu");
        //    WFSDictionary.Add(SPWorkflowState.Terminated, "Sonlandırıldı");
        //}

        //public static string GetValue(SPWorkflowState state)
        //{          
        //        if (WFSDictionary == null) Initilize();
        //        return WFSDictionary[state];
        //}

        //public static SPWorkflowState GetKey(string state)
        //{
        //        if (WFSDictionary == null) Initilize();
        //        try
        //        {
        //            return WFSDictionary.Single(item => item.Value == state).Key;
        //        }
        //        catch
        //        {
        //            return SPWorkflowState.None;
        //        }            
        //}
    }
}
